const { VantResolver } = require('unplugin-vue-components/resolvers');
const ComponentsPlugin = require('unplugin-vue-components/webpack');
module.exports = {
  lintOnSave: false,
  css: {
    loaderOptions: {
      postcss: {
        postcssOptions: {
          plugins: [
            require('postcss-pxtorem')({
              rootValue: 37.5,
              propList: ['*'], // 需要转换的属性，这里表示全部都转换
              selectorBlackList: ['.norem'], // 过滤掉.norem-开头的class，不进行rem转换
              exclude: /node_modules/i, // 排除node_modules目录下的文件
            }),
          ],
        },
      },
    },
  },

  configureWebpack: {
    plugins: [
      ComponentsPlugin({
        resolvers: [VantResolver()],
      }),
    ],
  },
};
